#ifndef INPUT_MANAGER_H
#define INPUT_MANAGER_H

#include "Singleton.h"
#include <windows.h>


#define DIRECTINPUT_VERSION (0x0800)
#include <dinput.h>
#include "D3DApp.h"




class InputManager
{
public:
	~InputManager();

	// Initialise Direct Input
	bool InitInputManager();
	// Initialise Keyboard
	bool InitKeyboard();
	// Initialise Mouse
	bool InitMouse();
	// Update the Keyboards Status
	bool Update();
	// Check if Key is Pressed
	bool KeyPressed(int Key);


	void Clean();


private:

	LPDIRECTINPUT8 m_pInputManager;
	LPDIRECTINPUTDEVICE8 m_pKeyboardDevice;
	LPDIRECTINPUTDEVICE8 m_pMouseDevice;
	
	char m_keyBuffer[256];

	InputManager() {}
	friend class Singleton<InputManager>;
};

typedef Singleton<InputManager> TheInputManager;

#endif